

    \filetitle{estimate}{Estimate a reduced-form VAR or BVAR}{VAR/estimate}

	\paragraph{Syntax}

\begin{verbatim}
[V,VData,Fitted] = estimate(V,Inp,Range,...)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{V} {[} VAR {]} - Empty VAR object.
\item
  \texttt{Inp} {[} struct {]} - Input database.
\item
  \texttt{Range} {[} numeric {]} - Estimation range, including
  \texttt{P} pre-sample periods, where \texttt{P} is the order of the
  VAR.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\item
  \texttt{V} {[} VAR {]} - Estimated reduced-form VAR object.
\item
  \texttt{VData} {[} struct {]} - Output database with the endogenous
  variables and the estimated residuals.
\item
  \texttt{Fitted} {[} numeric {]} - Dates for which fitted values have
  been calculated.
\end{itemize}

\paragraph{Options}

\begin{itemize}
\item
  \texttt{\textquotesingle{}A=\textquotesingle{}} {[} numeric \textbar{}
  \emph{empty} {]} - Restrictions on the individual values in the
  transition matrix, \texttt{A}.
\item
  \texttt{\textquotesingle{}BVAR=\textquotesingle{}} {[} numeric {]} -
  Prior dummy observations for estimating a BVAR; construct the dummy
  observations using the one of the \texttt{BVAR} functions.
\item
  \texttt{\textquotesingle{}C=\textquotesingle{}} {[} numeric \textbar{}
  \emph{empty} {]} - Restrictions on the individual values in the
  constant vector, \texttt{C}.
\item
  \texttt{\textquotesingle{}J=\textquotesingle{}} {[} numeric \textbar{}
  \emph{empty} {]} - Restrictions on the individual values in the
  coefficient matrix in front of exogenous inputs, \texttt{J}.
\item
  \texttt{\textquotesingle{}diff=\textquotesingle{}} {[} \texttt{true}
  \textbar{} \emph{\texttt{false}} {]} - Difference the series before
  estimating the VAR; integrate the series back afterwards.
\item
  \texttt{\textquotesingle{}G=\textquotesingle{}} {[} numeric \textbar{}
  \emph{empty} {]} - Restrictions on the individual values in the
  coefficient matrix in front of the co-integrating vector, \texttt{G}.
\item
  \texttt{\textquotesingle{}cointeg=\textquotesingle{}} {[} numeric
  \textbar{} \emph{empty} {]} - Co-integrating vectors (in rows) that
  will be imposed on the estimated VAR.
\item
  \texttt{\textquotesingle{}comment=\textquotesingle{}} {[} char
  \textbar{} \texttt{Inf} {]} - Assign comment to the estimated VAR
  object; \texttt{Inf} means the existing comment will be preserved.
\item
  \texttt{\textquotesingle{}constraints=\textquotesingle{}} {[} char
  \textbar{} cellstr {]} - General linear constraints on the VAR
  parameters.
\item
  \texttt{\textquotesingle{}constant=\textquotesingle{}} {[}
  \emph{\texttt{true}} \textbar{} \texttt{false} {]} - Include a
  constant vector in the VAR.
\item
  \texttt{\textquotesingle{}covParam=\textquotesingle{}} {[}
  \texttt{true} \textbar{} \emph{\texttt{false}} {]} - Calculate and
  store the covariance matrix of estimated parameters.
\item
  \texttt{\textquotesingle{}eqtnByEqtn=\textquotesingle{}} {[}
  \texttt{true} \textbar{} \emph{\texttt{false}} {]} - Estimate the VAR
  equation by equation.
\item
  \texttt{\textquotesingle{}maxIter=\textquotesingle{}} {[} numeric
  \textbar{} \emph{\texttt{1}} {]} - Maximum number of iterations when
  generalised least squares algorithm is involved.
\item
  \texttt{\textquotesingle{}mean=\textquotesingle{}} {[} numeric
  \textbar{} \emph{empty} {]} - Impose a particular asymptotic mean on
  the VAR process.
\item
  \texttt{\textquotesingle{}order=\textquotesingle{}} {[} numeric
  \textbar{} \emph{\texttt{1}} {]} - Order of the VAR.
\item
  \texttt{\textquotesingle{}progress=\textquotesingle{}} {[}
  \texttt{true} \textbar{} \emph{\texttt{false}} {]} - Display progress
  bar in the command window.
\item
  \texttt{\textquotesingle{}schur=\textquotesingle{}} {[}
  \emph{\texttt{true}} \textbar{} \texttt{false} {]} - Calculate
  triangular (Schur) representation of the estimated VAR straight away.
\item
  \texttt{\textquotesingle{}stdize=\textquotesingle{}} {[} \texttt{true}
  \textbar{} \emph{\texttt{false}} {]} - Adjust the prior dummy
  observations by the std dev of the observations.
\item
  \texttt{\textquotesingle{}timeWeights=}' {[} tseries \textbar{} empty
  {]} - Time series of weights applied to individual periods in the
  estimation range.
\item
  \texttt{\textquotesingle{}tolerance=\textquotesingle{}} {[} numeric
  \textbar{} \emph{\texttt{1e-5}} {]} - Convergence tolerance when
  generalised least squares algorithm is involved.
\item
  \texttt{\textquotesingle{}warning=\textquotesingle{}} {[}
  \emph{\texttt{true}} \textbar{} \texttt{false} {]} - Display warnings
  produced by this function.
\end{itemize}

\paragraph{Options for panel VAR}

\begin{itemize}
\item
  \texttt{\textquotesingle{}fixedEff=\textquotesingle{}} {[}
  \emph{\texttt{true}} \textbar{} \texttt{false} {]} - Include constant
  dummies for fixed effect in panel estimation; applies only if
  \texttt{\textquotesingle{}constant=\textquotesingle{}\ true}.
\item
  \texttt{\textquotesingle{}groupWeights=\textquotesingle{}} {[} numeric
  \textbar{} \emph{empty} {]} - A 1-by-NGrp vector of weights applied to
  groups in panel estimation, where NGrp is the number of groups; the
  weights will be rescaled so as to sum up to \texttt{1}.
\end{itemize}

\paragraph{Description}

\subparagraph{Estimating a panel VAR}

Panel VAR objects are created by calling the function
\href{VAR/VAR}{\texttt{VAR}} with two input arguments: the list of
variables, and the list of group names. To estimate a panel VAR, the
input data, \texttt{Inp}, must be organised a super-database with
sub-databases for each group, and time series for each variables within
each group:

\begin{verbatim}
d.Group1_Name.Var1_Name
d.Group1_Name.Var2_Name
...
d.Group2_Name.Var1_Name
d.Group2_Name.Var2_Name
...
\end{verbatim}

\paragraph{Example}


